package cn.hist.hfp.repository;

import cn.hist.hfp.entity.Manager;
import cn.hist.hfp.entity.ManagerValidation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface ManagerValidationRepository extends JpaRepository<ManagerValidation, Integer> {

    void deleteAllByManager(Manager manager);

    Optional<ManagerValidation> findTopByManager(Manager manager);
}
